﻿using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.Practices.ObjectBuilder2
{
	public interface IPolicyList
	{
		// Methods
		void Clear<TPolicyInterface>(object buildKey);
		void Clear(Type policyInterface, object buildKey);
		void ClearAll();
		void ClearDefault<TPolicyInterface>();
		void ClearDefault(Type policyInterface);
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Back compat with ObjectBuilder")]
		TPolicyInterface Get<TPolicyInterface>(object buildKey) where TPolicyInterface : IBuilderPolicy;
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Back compat with ObjectBuilder")]
		TPolicyInterface Get<TPolicyInterface>(object buildKey, bool localOnly) where TPolicyInterface : IBuilderPolicy;
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Back compat with ObjectBuilder")]
		IBuilderPolicy Get(Type policyInterface, object buildKey);
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Back compat with ObjectBuilder")]
		IBuilderPolicy Get(Type policyInterface, object buildKey, bool localOnly);
		TPolicyInterface GetNoDefault<TPolicyInterface>(object buildKey, bool localOnly) where TPolicyInterface : IBuilderPolicy;
		IBuilderPolicy GetNoDefault(Type policyInterface, object buildKey, bool localOnly);
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Set", Justification = "Back compat with ObjectBuilder")]
		void Set<TPolicyInterface>(TPolicyInterface policy, object buildKey) where TPolicyInterface : IBuilderPolicy;
		[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Set", Justification = "Back compat with ObjectBuilder")]
		void Set(Type policyInterface, IBuilderPolicy policy, object buildKey);
		void SetDefault<TPolicyInterface>(TPolicyInterface policy) where TPolicyInterface : IBuilderPolicy;
		void SetDefault(Type policyInterface, IBuilderPolicy policy);
	}
}
